//
// Created by jason on 2025/4/19.
//
#pragma once

#include <cstdio>

#include <string>

#ifdef __cplusplus
extern "C" {
#endif


#define MESSAGE_ID_CONTROL_COMMAND 0x00
#define MESSAGE_ID_TAKE_FLUO_SEQUENCE_PICTURE 0x06
#define MESSAGE_ID_SERIAL_NUMBER 0X20
#define MESSAGE_ID_SET_CALIBRATION_FILE 0X21
#define MESSAGE_ID_GET_CALIBRATION_FILE 0X22
#define MESSAGE_ID_GET_KIT_STATE 0X30
#define MESSAGE_ID_SET_TIMESTAMP 0x31

#define SERIAL_NUMBER_GET 0X00
#define SERIAL_NUMBER_SET 0X01


namespace BA330 {

    void getDeviceInfo(char **deviceInfo);

    void setSerialNumber(const char *serialNumber);

    void setFile(uint8_t fileType, int sourceFd);

    void getFile(uint8_t fileType, const uint8_t *params, size_t paramsLength, int targetFd);

    int getKitSate();

    void takeFluoSequencePicture(const int32_t *exposureTimeArray, uint8_t exposureTimeArrayLength,
                                 const int *targetArray, uint8_t targetArrayLength, uint8_t brightness);

    void controlCommand(uint8_t command, const uint8_t *data, uint32_t dataLength);

    void reboot();

    void setTimestamp();

}

#ifdef __cplusplus
}
#endif